home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / CIncludes / Drag.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  22.9 KB  |  613 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Drag.h
  3.  
  4.      Contains:    Drag and Drop Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1992-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __DRAG__
  18. #define __DRAG__
  19.  
  20. #ifndef __MACTYPES__
  21. #include <MacTypes.h>
  22. #endif
  23. #ifndef __EVENTS__
  24. #include <Events.h>
  25. #endif
  26. #ifndef __FILES__
  27. #include <Files.h>
  28. #endif
  29. #ifndef __APPLEEVENTS__
  30. #include <AppleEvents.h>
  31. #endif
  32. #ifndef __QUICKDRAW__
  33. #include <Quickdraw.h>
  34. #endif
  35.  
  36.  
  37.  
  38. #if PRAGMA_ONCE
  39. #pragma once
  40. #endif
  41.  
  42. #ifdef __cplusplus
  43. extern "C" {
  44. #endif
  45.  
  46. #if PRAGMA_IMPORT
  47. #pragma import on
  48. #endif
  49.  
  50. #if PRAGMA_STRUCT_ALIGN
  51.     #pragma options align=mac68k
  52. #elif PRAGMA_STRUCT_PACKPUSH
  53.     #pragma pack(push, 2)
  54. #elif PRAGMA_STRUCT_PACK
  55.     #pragma pack(2)
  56. #endif
  57.  
  58. /*
  59.   _________________________________________________________________________________________________________
  60.       
  61.    • DRAG MANAGER DATA TYPES
  62.   _________________________________________________________________________________________________________
  63. */
  64.  
  65. typedef struct OpaqueDragReference*     DragReference;
  66. typedef UInt32                             ItemReference;
  67. typedef OSType                             FlavorType;
  68. /*
  69.   _________________________________________________________________________________________________________
  70.       
  71.    • DRAG ATTRIBUTES
  72.   _________________________________________________________________________________________________________
  73. */
  74.  
  75. typedef OptionBits                         DragAttributes;
  76.  
  77. enum {
  78.     kDragHasLeftSenderWindow    = (1L << 0),                    /* drag has left the source window since TrackDrag*/
  79.     kDragInsideSenderApplication = (1L << 1),                    /* drag is occurring within the sender application*/
  80.     kDragInsideSenderWindow        = (1L << 2)                        /* drag is occurring within the sender window*/
  81. };
  82.  
  83. /*
  84.   _________________________________________________________________________________________________________
  85.       
  86.    • DRAG IMAGE FLAGS
  87.   _________________________________________________________________________________________________________
  88. */
  89.  
  90. typedef OptionBits                         DragImageFlags;
  91.  
  92. enum {
  93.     kDragRegionAndImage            = (1L << 4)                        /* drag region and image*/
  94. };
  95.  
  96. /*
  97.   _________________________________________________________________________________________________________
  98.       
  99.    • DRAG IMAGE TRANSLUCENCY LEVELS
  100.   _________________________________________________________________________________________________________
  101. */
  102.  
  103.  
  104. enum {
  105.     kDragStandardTranslucency    = 0L,                            /* 65% image translucency (standard)*/
  106.     kDragDarkTranslucency        = 1L,                            /* 50% image translucency*/
  107.     kDragDarkerTranslucency        = 2L,                            /* 25% image translucency*/
  108.     kDragOpaqueTranslucency        = 3L                            /* 0% image translucency (opaque)*/
  109. };
  110.  
  111. /*
  112.   _________________________________________________________________________________________________________
  113.       
  114.    • DRAG DRAWING PROCEDURE MESSAGES
  115.   _________________________________________________________________________________________________________
  116. */
  117.  
  118. typedef SInt16                             DragRegionMessage;
  119.  
  120. enum {
  121.     kDragRegionBegin            = 1,                            /* initialize drawing*/
  122.     kDragRegionDraw                = 2,                            /* draw drag feedback*/
  123.     kDragRegionHide                = 3,                            /* hide drag feedback*/
  124.     kDragRegionIdle                = 4,                            /* drag feedback idle time*/
  125.     kDragRegionEnd                = 5                                /* end of drawing*/
  126. };
  127.  
  128. /*
  129.   _________________________________________________________________________________________________________
  130.       
  131.    • ZOOM ACCELERATION
  132.   _________________________________________________________________________________________________________
  133. */
  134.  
  135. typedef SInt16                             ZoomAcceleration;
  136.  
  137. enum {
  138.     kZoomNoAcceleration            = 0,                            /* use linear interpolation*/
  139.     kZoomAccelerate                = 1,                            /* ramp up step size*/
  140.     kZoomDecelerate                = 2                                /* ramp down step size*/
  141. };
  142.  
  143. /*
  144.   _________________________________________________________________________________________________________
  145.       
  146.    • FLAVOR FLAGS
  147.   _________________________________________________________________________________________________________
  148. */
  149.  
  150. typedef OptionBits                         FlavorFlags;
  151.  
  152. enum {
  153.     flavorSenderOnly            = (1 << 0),                        /* flavor is available to sender only*/
  154.     flavorSenderTranslated        = (1 << 1),                        /* flavor is translated by sender*/
  155.     flavorNotSaved                = (1 << 2),                        /* flavor should not be saved*/
  156.     flavorSystemTranslated        = (1 << 8)                        /* flavor is translated by system*/
  157. };
  158.  
  159. /*
  160.   _________________________________________________________________________________________________________
  161.       
  162.    • SPECIAL FLAVORS
  163.   _________________________________________________________________________________________________________
  164. */
  165.  
  166.  
  167. enum {
  168.     flavorTypeHFS                = FOUR_CHAR_CODE('hfs '),        /* flavor type for HFS data*/
  169.     flavorTypePromiseHFS        = FOUR_CHAR_CODE('phfs'),        /* flavor type for promised HFS data*/
  170.     flavorTypeDirectory            = FOUR_CHAR_CODE('diry')        /* flavor type for AOCE directories*/
  171. };
  172.  
  173. /*
  174.   _________________________________________________________________________________________________________
  175.       
  176.    • FLAVORS FOR FINDER 8.0 AND LATER
  177.   _________________________________________________________________________________________________________
  178. */
  179.  
  180.  
  181. enum {
  182.     kFlavorTypeClippingName        = FOUR_CHAR_CODE('clnm'),        /* name hint for clipping file (preferred over 'clfn')*/
  183.     kFlavorTypeClippingFilename    = FOUR_CHAR_CODE('clfn'),        /* name for clipping file*/
  184.     kFlavorTypeDragToTrashOnly    = FOUR_CHAR_CODE('fdtt'),        /* for apps that want to allow dragging private data to the trash*/
  185.     kFlavorTypeFinderNoTrackingBehavior = FOUR_CHAR_CODE('fntb') /* Finder completely ignores any drag containing this flavor*/
  186. };
  187.  
  188. /*
  189.   _________________________________________________________________________________________________________
  190.       
  191.    • DRAG TRACKING HANDLER MESSAGES
  192.   _________________________________________________________________________________________________________
  193. */
  194.  
  195. typedef SInt16                             DragTrackingMessage;
  196.  
  197. enum {
  198.     kDragTrackingEnterHandler    = 1,                            /* drag has entered handler*/
  199.     kDragTrackingEnterWindow    = 2,                            /* drag has entered window*/
  200.     kDragTrackingInWindow        = 3,                            /* drag is moving within window*/
  201.     kDragTrackingLeaveWindow    = 4,                            /* drag has exited window*/
  202.     kDragTrackingLeaveHandler    = 5                                /* drag has exited handler*/
  203. };
  204.  
  205. /*
  206.   _________________________________________________________________________________________________________
  207.       
  208.    • HFS FLAVORS
  209.   _________________________________________________________________________________________________________
  210. */
  211.  
  212.  
  213. struct HFSFlavor {
  214.     OSType                             fileType;                    /* file type */
  215.     OSType                             fileCreator;                /* file creator */
  216.     UInt16                             fdFlags;                    /* Finder flags */
  217.     FSSpec                             fileSpec;                    /* file system specification */
  218. };
  219. typedef struct HFSFlavor                HFSFlavor;
  220.  
  221. struct PromiseHFSFlavor {
  222.     OSType                             fileType;                    /* file type */
  223.     OSType                             fileCreator;                /* file creator */
  224.     UInt16                             fdFlags;                    /* Finder flags */
  225.     FlavorType                         promisedFlavor;                /* promised flavor containing an FSSpec */
  226. };
  227. typedef struct PromiseHFSFlavor            PromiseHFSFlavor;
  228. /*
  229.   _________________________________________________________________________________________________________
  230.       
  231.    • APPLICATION-DEFINED DRAG HANDLER ROUTINES
  232.   _________________________________________________________________________________________________________
  233. */
  234. typedef CALLBACK_API( OSErr , DragTrackingHandlerProcPtr )(DragTrackingMessage message, WindowPtr theWindow, void *handlerRefCon, DragReference theDrag);
  235. typedef CALLBACK_API( OSErr , DragReceiveHandlerProcPtr )(WindowPtr theWindow, void *handlerRefCon, DragReference theDrag);
  236. typedef STACK_UPP_TYPE(DragTrackingHandlerProcPtr)                 DragTrackingHandlerUPP;
  237. typedef STACK_UPP_TYPE(DragReceiveHandlerProcPtr)                 DragReceiveHandlerUPP;
  238. enum { uppDragTrackingHandlerProcInfo = 0x00003FA0 };             /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes, 4_bytes) */
  239. enum { uppDragReceiveHandlerProcInfo = 0x00000FE0 };             /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  240. #define NewDragTrackingHandlerProc(userRoutine)                 (DragTrackingHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragTrackingHandlerProcInfo, GetCurrentArchitecture())
  241. #define NewDragReceiveHandlerProc(userRoutine)                     (DragReceiveHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragReceiveHandlerProcInfo, GetCurrentArchitecture())
  242. #define CallDragTrackingHandlerProc(userRoutine, message, theWindow, handlerRefCon, theDrag)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppDragTrackingHandlerProcInfo, (message), (theWindow), (handlerRefCon), (theDrag))
  243. #define CallDragReceiveHandlerProc(userRoutine, theWindow, handlerRefCon, theDrag)  CALL_THREE_PARAMETER_UPP((userRoutine), uppDragReceiveHandlerProcInfo, (theWindow), (handlerRefCon), (theDrag))
  244. /*
  245.   _________________________________________________________________________________________________________
  246.       
  247.    • APPLICATION-DEFINED ROUTINES
  248.   _________________________________________________________________________________________________________
  249. */
  250. typedef CALLBACK_API( OSErr , DragSendDataProcPtr )(FlavorType theType, void *dragSendRefCon, ItemReference theItemRef, DragReference theDrag);
  251. typedef CALLBACK_API( OSErr , DragInputProcPtr )(Point *mouse, SInt16 *modifiers, void *dragInputRefCon, DragReference theDrag);
  252. typedef CALLBACK_API( OSErr , DragDrawingProcPtr )(DragRegionMessage message, RgnHandle showRegion, Point showOrigin, RgnHandle hideRegion, Point hideOrigin, void *dragDrawingRefCon, DragReference theDrag);
  253. typedef STACK_UPP_TYPE(DragSendDataProcPtr)                     DragSendDataUPP;
  254. typedef STACK_UPP_TYPE(DragInputProcPtr)                         DragInputUPP;
  255. typedef STACK_UPP_TYPE(DragDrawingProcPtr)                         DragDrawingUPP;
  256. enum { uppDragSendDataProcInfo = 0x00003FE0 };                     /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  257. enum { uppDragInputProcInfo = 0x00003FE0 };                     /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  258. enum { uppDragDrawingProcInfo = 0x000FFFA0 };                     /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  259. #define NewDragSendDataProc(userRoutine)                         (DragSendDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragSendDataProcInfo, GetCurrentArchitecture())
  260. #define NewDragInputProc(userRoutine)                             (DragInputUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragInputProcInfo, GetCurrentArchitecture())
  261. #define NewDragDrawingProc(userRoutine)                         (DragDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragDrawingProcInfo, GetCurrentArchitecture())
  262. #define CallDragSendDataProc(userRoutine, theType, dragSendRefCon, theItemRef, theDrag)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppDragSendDataProcInfo, (theType), (dragSendRefCon), (theItemRef), (theDrag))
  263. #define CallDragInputProc(userRoutine, mouse, modifiers, dragInputRefCon, theDrag)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppDragInputProcInfo, (mouse), (modifiers), (dragInputRefCon), (theDrag))
  264. #define CallDragDrawingProc(userRoutine, message, showRegion, showOrigin, hideRegion, hideOrigin, dragDrawingRefCon, theDrag)  CALL_SEVEN_PARAMETER_UPP((userRoutine), uppDragDrawingProcInfo, (message), (showRegion), (showOrigin), (hideRegion), (hideOrigin), (dragDrawingRefCon), (theDrag))
  265. /*
  266.   _________________________________________________________________________________________________________
  267.       
  268.    • INSTALLING AND REMOVING HANDLERS API'S
  269.   _________________________________________________________________________________________________________
  270. */
  271.  
  272. EXTERN_API( OSErr )
  273. InstallTrackingHandler            (DragTrackingHandlerUPP  trackingHandler,
  274.                                  WindowPtr                 theWindow,
  275.                                  void *                    handlerRefCon)                        TWOWORDINLINE(0x7001, 0xABED);
  276.  
  277. EXTERN_API( OSErr )
  278. InstallReceiveHandler            (DragReceiveHandlerUPP     receiveHandler,
  279.                                  WindowPtr                 theWindow,
  280.                                  void *                    handlerRefCon)                        TWOWORDINLINE(0x7002, 0xABED);
  281.  
  282. EXTERN_API( OSErr )
  283. RemoveTrackingHandler            (DragTrackingHandlerUPP  trackingHandler,
  284.                                  WindowPtr                 theWindow)                            TWOWORDINLINE(0x7003, 0xABED);
  285.  
  286. EXTERN_API( OSErr )
  287. RemoveReceiveHandler            (DragReceiveHandlerUPP     receiveHandler,
  288.                                  WindowPtr                 theWindow)                            TWOWORDINLINE(0x7004, 0xABED);
  289.  
  290. /*
  291.   _________________________________________________________________________________________________________
  292.       
  293.    • CREATING & DISPOSING
  294.   _________________________________________________________________________________________________________
  295. */
  296.  
  297. EXTERN_API( OSErr )
  298. NewDrag                            (DragReference *        theDrag)                            TWOWORDINLINE(0x7005, 0xABED);
  299.  
  300. EXTERN_API( OSErr )
  301. DisposeDrag                        (DragReference             theDrag)                            TWOWORDINLINE(0x7006, 0xABED);
  302.  
  303. /*
  304.   _________________________________________________________________________________________________________
  305.       
  306.    • ADDING DRAG ITEM FLAVORS
  307.   _________________________________________________________________________________________________________
  308. */
  309.  
  310. EXTERN_API( OSErr )
  311. AddDragItemFlavor                (DragReference             theDrag,
  312.                                  ItemReference             theItemRef,
  313.                                  FlavorType             theType,
  314.                                  const void *            dataPtr,
  315.                                  Size                     dataSize,
  316.                                  FlavorFlags             theFlags)                            TWOWORDINLINE(0x7007, 0xABED);
  317.  
  318. EXTERN_API( OSErr )
  319. SetDragItemFlavorData            (DragReference             theDrag,
  320.                                  ItemReference             theItemRef,
  321.                                  FlavorType             theType,
  322.                                  const void *            dataPtr,
  323.                                  Size                     dataSize,
  324.                                  UInt32                 dataOffset)                            TWOWORDINLINE(0x7009, 0xABED);
  325.  
  326. /*
  327.   _________________________________________________________________________________________________________
  328.       
  329.    • PROVIDING CALLBACK PROCEDURES
  330.   _________________________________________________________________________________________________________
  331. */
  332.  
  333. EXTERN_API( OSErr )
  334. SetDragSendProc                    (DragReference             theDrag,
  335.                                  DragSendDataUPP         sendProc,
  336.                                  void *                    dragSendRefCon)                        TWOWORDINLINE(0x700A, 0xABED);
  337.  
  338.  
  339. EXTERN_API( OSErr )
  340. SetDragInputProc                (DragReference             theDrag,
  341.                                  DragInputUPP             inputProc,
  342.                                  void *                    dragInputRefCon)                    TWOWORDINLINE(0x700B, 0xABED);
  343.  
  344. EXTERN_API( OSErr )
  345. SetDragDrawingProc                (DragReference             theDrag,
  346.                                  DragDrawingUPP         drawingProc,
  347.                                  void *                    dragDrawingRefCon)                    TWOWORDINLINE(0x700C, 0xABED);
  348.  
  349. /*
  350.   _________________________________________________________________________________________________________
  351.       
  352.    • SETTING THE DRAG IMAGE
  353.   _________________________________________________________________________________________________________
  354. */
  355.  
  356. EXTERN_API( OSErr )
  357. SetDragImage                    (DragReference             theDrag,
  358.                                  PixMapHandle             imagePixMap,
  359.                                  RgnHandle                 imageRgn,
  360.                                  Point                     imageOffsetPt,
  361.                                  DragImageFlags         theImageFlags)                        TWOWORDINLINE(0x7027, 0xABED);
  362.  
  363. /*
  364.   _________________________________________________________________________________________________________
  365.       
  366.    • PERFORMING A DRAG
  367.   _________________________________________________________________________________________________________
  368. */
  369.  
  370. EXTERN_API( OSErr )
  371. TrackDrag                        (DragReference             theDrag,
  372.                                  const EventRecord *    theEvent,
  373.                                  RgnHandle                 theRegion)                            TWOWORDINLINE(0x700D, 0xABED);
  374.  
  375. /*
  376.   _________________________________________________________________________________________________________
  377.       
  378.    • GETTING DRAG ITEM INFORMATION
  379.   _________________________________________________________________________________________________________
  380. */
  381.  
  382. EXTERN_API( OSErr )
  383. CountDragItems                    (DragReference             theDrag,
  384.                                  UInt16 *                numItems)                            TWOWORDINLINE(0x700E, 0xABED);
  385.  
  386. EXTERN_API( OSErr )
  387. GetDragItemReferenceNumber        (DragReference             theDrag,
  388.                                  UInt16                 index,
  389.                                  ItemReference *        theItemRef)                            TWOWORDINLINE(0x700F, 0xABED);
  390.  
  391. EXTERN_API( OSErr )
  392. CountDragItemFlavors            (DragReference             theDrag,
  393.                                  ItemReference             theItemRef,
  394.                                  UInt16 *                numFlavors)                            TWOWORDINLINE(0x7010, 0xABED);
  395.  
  396. EXTERN_API( OSErr )
  397. GetFlavorType                    (DragReference             theDrag,
  398.                                  ItemReference             theItemRef,
  399.                                  UInt16                 index,
  400.                                  FlavorType *            theType)                            TWOWORDINLINE(0x7011, 0xABED);
  401.  
  402. EXTERN_API( OSErr )
  403. GetFlavorFlags                    (DragReference             theDrag,
  404.                                  ItemReference             theItemRef,
  405.                                  FlavorType             theType,
  406.                                  FlavorFlags *            theFlags)                            TWOWORDINLINE(0x7012, 0xABED);
  407.  
  408. EXTERN_API( OSErr )
  409. GetFlavorDataSize                (DragReference             theDrag,
  410.                                  ItemReference             theItemRef,
  411.                                  FlavorType             theType,
  412.                                  Size *                    dataSize)                            TWOWORDINLINE(0x7013, 0xABED);
  413.  
  414. EXTERN_API( OSErr )
  415. GetFlavorData                    (DragReference             theDrag,
  416.                                  ItemReference             theItemRef,
  417.                                  FlavorType             theType,
  418.                                  void *                    dataPtr,
  419.                                  Size *                    dataSize,
  420.                                  UInt32                 dataOffset)                            TWOWORDINLINE(0x7014, 0xABED);
  421.  
  422. /*
  423.   _________________________________________________________________________________________________________
  424.       
  425.    • DRAG ITEM BOUNDS
  426.   _________________________________________________________________________________________________________
  427. */
  428.  
  429. EXTERN_API( OSErr )
  430. GetDragItemBounds                (DragReference             theDrag,
  431.                                  ItemReference             theItemRef,
  432.                                  Rect *                    itemBounds)                            TWOWORDINLINE(0x7015, 0xABED);
  433.  
  434. EXTERN_API( OSErr )
  435. SetDragItemBounds                (DragReference             theDrag,
  436.                                  ItemReference             theItemRef,
  437.                                  const Rect *            itemBounds)                            TWOWORDINLINE(0x7016, 0xABED);
  438.  
  439. /*
  440.   _________________________________________________________________________________________________________
  441.       
  442.    • DROP LOCATIONS
  443.   _________________________________________________________________________________________________________
  444. */
  445.  
  446. EXTERN_API( OSErr )
  447. GetDropLocation                    (DragReference             theDrag,
  448.                                  AEDesc *                dropLocation)                        TWOWORDINLINE(0x7017, 0xABED);
  449.  
  450. EXTERN_API( OSErr )
  451. SetDropLocation                    (DragReference             theDrag,
  452.                                  const AEDesc *            dropLocation)                        TWOWORDINLINE(0x7018, 0xABED);
  453.  
  454. /*
  455.   _________________________________________________________________________________________________________
  456.       
  457.    • GETTING INFORMATION ABOUT A DRAG
  458.   _________________________________________________________________________________________________________
  459. */
  460.  
  461. EXTERN_API( OSErr )
  462. GetDragAttributes                (DragReference             theDrag,
  463.                                  DragAttributes *        flags)                                TWOWORDINLINE(0x7019, 0xABED);
  464.  
  465. EXTERN_API( OSErr )
  466. GetDragMouse                    (DragReference             theDrag,
  467.                                  Point *                mouse,
  468.                                  Point *                globalPinnedMouse)                    TWOWORDINLINE(0x701A, 0xABED);
  469.  
  470. EXTERN_API( OSErr )
  471. SetDragMouse                    (DragReference             theDrag,
  472.                                  Point                     globalPinnedMouse)                    TWOWORDINLINE(0x701B, 0xABED);
  473.  
  474. EXTERN_API( OSErr )
  475. GetDragOrigin                    (DragReference             theDrag,
  476.                                  Point *                globalInitialMouse)                    TWOWORDINLINE(0x701C, 0xABED);
  477.  
  478. EXTERN_API( OSErr )
  479. GetDragModifiers                (DragReference             theDrag,
  480.                                  SInt16 *                modifiers,
  481.                                  SInt16 *                mouseDownModifiers,
  482.                                  SInt16 *                mouseUpModifiers)                    TWOWORDINLINE(0x701D, 0xABED);
  483.  
  484. /*
  485.   _________________________________________________________________________________________________________
  486.       
  487.    • DRAG HIGHLIGHTING
  488.   _________________________________________________________________________________________________________
  489. */
  490.  
  491. EXTERN_API( OSErr )
  492. ShowDragHilite                    (DragReference             theDrag,
  493.                                  RgnHandle                 hiliteFrame,
  494.                                  Boolean                 inside)                                TWOWORDINLINE(0x701E, 0xABED);
  495.  
  496. EXTERN_API( OSErr )
  497. HideDragHilite                    (DragReference             theDrag)                            TWOWORDINLINE(0x701F, 0xABED);
  498.  
  499. EXTERN_API( OSErr )
  500. DragPreScroll                    (DragReference             theDrag,
  501.                                  SInt16                 dH,
  502.                                  SInt16                 dV)                                    TWOWORDINLINE(0x7020, 0xABED);
  503.  
  504. EXTERN_API( OSErr )
  505. DragPostScroll                    (DragReference             theDrag)                            TWOWORDINLINE(0x7021, 0xABED);
  506.  
  507. EXTERN_API( OSErr )
  508. UpdateDragHilite                (DragReference             theDrag,
  509.                                  RgnHandle                 updateRgn)                            TWOWORDINLINE(0x7022, 0xABED);
  510.  
  511. EXTERN_API( OSErr )
  512. GetDragHiliteColor                (WindowPtr                 window,
  513.                                  RGBColor *                color)                                TWOWORDINLINE(0x7026, 0xABED);
  514.  
  515.  
  516. /*
  517.   _________________________________________________________________________________________________________
  518.       
  519.    • UTILITIES
  520.   _________________________________________________________________________________________________________
  521. */
  522.  
  523.  
  524. EXTERN_API( Boolean )
  525. WaitMouseMoved                    (Point                     initialMouse)                        TWOWORDINLINE(0x7023, 0xABED);
  526.  
  527.  
  528. EXTERN_API( OSErr )
  529. ZoomRects                        (const Rect *            fromRect,
  530.                                  const Rect *            toRect,
  531.                                  SInt16                 zoomSteps,
  532.                                  ZoomAcceleration         acceleration)                        TWOWORDINLINE(0x7024, 0xABED);
  533.  
  534. EXTERN_API( OSErr )
  535. ZoomRegion                        (RgnHandle                 region,
  536.                                  Point                     zoomDistance,
  537.                                  SInt16                 zoomSteps,
  538.                                  ZoomAcceleration         acceleration)                        TWOWORDINLINE(0x7025, 0xABED);
  539.  
  540.  
  541. /*
  542.   _________________________________________________________________________________________________________
  543.    • OLD NAMES
  544.      These are provided for compatiblity with older source bases.  It is recommended to not use them since
  545.        they may removed from this interface file at any time.
  546.   _________________________________________________________________________________________________________
  547. */
  548.  
  549. #if OLDROUTINENAMES
  550.  
  551. enum {
  552.     dragHasLeftSenderWindow        = kDragHasLeftSenderWindow,        /* drag has left the source window since TrackDrag */
  553.     dragInsideSenderApplication    = kDragInsideSenderApplication,    /* drag is occurring within the sender application */
  554.     dragInsideSenderWindow        = kDragInsideSenderWindow        /* drag is occurring within the sender window */
  555. };
  556.  
  557.  
  558. enum {
  559.     dragTrackingEnterHandler    = kDragTrackingEnterHandler,    /* drag has entered handler */
  560.     dragTrackingEnterWindow        = kDragTrackingEnterWindow,        /* drag has entered window */
  561.     dragTrackingInWindow        = kDragTrackingInWindow,        /* drag is moving within window */
  562.     dragTrackingLeaveWindow        = kDragTrackingLeaveWindow,        /* drag has exited window */
  563.     dragTrackingLeaveHandler    = kDragTrackingLeaveHandler        /* drag has exited handler */
  564. };
  565.  
  566.  
  567. enum {
  568.     dragRegionBegin                = kDragRegionBegin,                /* initialize drawing */
  569.     dragRegionDraw                = kDragRegionDraw,                /* draw drag feedback */
  570.     dragRegionHide                = kDragRegionHide,                /* hide drag feedback */
  571.     dragRegionIdle                = kDragRegionIdle,                /* drag feedback idle time */
  572.     dragRegionEnd                = kDragRegionEnd                /* end of drawing */
  573. };
  574.  
  575.  
  576. enum {
  577.     zoomNoAcceleration            = kZoomNoAcceleration,            /* use linear interpolation */
  578.     zoomAccelerate                = kZoomAccelerate,                /* ramp up step size */
  579.     zoomDecelerate                = kZoomDecelerate                /* ramp down step size */
  580. };
  581.  
  582.  
  583. enum {
  584.     kDragStandardImage            = kDragStandardTranslucency,    /* 65% image translucency (standard)*/
  585.     kDragDarkImage                = kDragDarkTranslucency,        /* 50% image translucency*/
  586.     kDragDarkerImage            = kDragDarkerTranslucency,        /* 25% image translucency*/
  587.     kDragOpaqueImage            = kDragOpaqueTranslucency        /* 0% image translucency (opaque)*/
  588. };
  589.  
  590. #endif  /* OLDROUTINENAMES */
  591.  
  592.  
  593. #if PRAGMA_STRUCT_ALIGN
  594.     #pragma options align=reset
  595. #elif PRAGMA_STRUCT_PACKPUSH
  596.     #pragma pack(pop)
  597. #elif PRAGMA_STRUCT_PACK
  598.     #pragma pack()
  599. #endif
  600.  
  601. #ifdef PRAGMA_IMPORT_OFF
  602. #pragma import off
  603. #elif PRAGMA_IMPORT
  604. #pragma import reset
  605. #endif
  606.  
  607. #ifdef __cplusplus
  608. }
  609. #endif
  610.  
  611. #endif /* __DRAG__ */
  612.  
  613.